<template>
  <div class="prompter">
    <div>
      <el-form ref="dataForm" class="oldIndent_nav">
        <div style="margin-bottom:20px;margin-top:10px;">
          <span style="margin-left:60px">姓名：</span>
          <el-input placeholder="请输入姓名" style="width:200px" />
          <span style="margin-left:60px">电话号码：</span>
          <el-input placeholder="请输入电话" style="width:200px" />
          <span style="margin-left:30px">起始时间:</span>
          <el-date-picker
            type="date"
            placeholder="选择起始时间"
            format="yyyy 年 MM 月 dd 日"
            value-format="yyyyMMdd"
          />
          <span style="margin-left:50px">结束时间:</span>
          <el-date-picker
            type="date"
            placeholder="选择结束时间"
            format="yyyy 年 MM 月 dd 日"
            value-format="yyyyMMdd"
          />
          <el-button type="primary" round style="float:right;margin-right:200px">查询</el-button>
        </div>
      </el-form>
    </div>
    <div class="table">
      <el-table :data="tableData" border style="width: 100%">
        <el-table-column prop="route" align="center" label="巡更范围" />
        <el-table-column prop="name" align="center" label="执行人员" />
        <el-table-column prop="phone" align="center" label="电话号" />
        <el-table-column prop="setTimed" align="center" label="巡更时间" />
        <el-table-column prop="timeing" align="center" label="巡更用时" />
        <el-table-column align="center" label="操作">
          <template slot-scope="scope" />
        </el-table-column>
      </el-table>
    </div>
    <!-- 分页 -->
    <el-col :span="24" class="toolbar" style="text-align: center;">
      <el-pagination
        background
        :current-page="currentPage"
        :page-count="pageNum"
        :page-size="pagesize"
        style="margin-top:30px;margin-bottom:30px"
        layout="total, prev, pager, next, jumper"
        :total="total"
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
      />
    </el-col>
  </div>
</template>
<script>
export default {
  data() {
    return {
      currentPage: 1, // 初始页
      pagesize: 10, // 当前页面内的列表行数
      pageCount: 1,
      pageNum: 1, // 页数
      total: 7,
      tableData: [
        {
          route: '小区1幢1单元',
          name: '王小明',
          phone: '13456565656',
          setTimed: '2019-12-11 11:32:46',
          timeing: '30分钟'
        },
        {
          route: '小区1幢1单元',
          name: '王小明',
          phone: '13456565656',
          setTimed: '2019-12-11 11:32:46',
          timeing: '30分钟'
        },
        {
          route: '小区1幢1单元',
          name: '王小明',
          phone: '13456565656',
          setTimed: '2019-12-11 11:32:46',
          timeing: '30分钟'
        },
        {
          route: '小区1幢1单元',
          name: '王小明',
          phone: '13456565656',
          setTimed: '2019-12-11 11:32:46',
          timeing: '30分钟'
        },
        {
          route: '小区1幢1单元',
          name: '王小明',
          phone: '13456565656',
          setTimed: '2019-12-11 11:32:46',
          timeing: '30分钟'
        },
        {
          route: '小区1幢1单元',
          name: '王小明',
          phone: '13456565656',
          setTimed: '2019-12-11 11:32:46',
          timeing: '30分钟'
        }
      ]
    }
  },
  mounted() {},
  methods: {
    // 当前页
    handleSizeChange: function(pagesize) {
      this.pagesize = pagesize
    },
    // 换页：更新列表数据
    handleCurrentChange: function(currentPage) {
      this.currentPage = currentPage
    }
  }
}
</script>
<style lang="scss"  scoped>
.prompter {
  margin-top: 55px;
  width: 100%;
  overflow: hidden;
}
</style>
